added samples
[windows-sources.git] / sdk / samples / all in on code / Visual Studio 2008 / VBSL3Navigation / VBSL3Navigation.Web / VBSL3NavigationTestPage.aspx
blob2a319d0f64c80164c04691d9d8fe90d357a53cfc
1 <%@ Page Language="VB" AutoEventWireup="true" %>
3 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
4 <html xmlns="http://www.w3.org/1999/xhtml" >
5 <head runat="server">
6     <title>VBSL3Navigation</title>
7     <style type="text/css">
8     html, body {
9             height: 100%;
10             overflow: auto;
11     }
12     body {
13             padding: 0;
14             margin: 0;
15     }
16     #silverlightControlHost {
17             height: 100%;
18             text-align:center;
19     }
20     </style>
21     <script type="text/javascript" src="Silverlight.js"></script>
22     <script type="text/javascript">
23         function onSilverlightError(sender, args) {
24             var appSource = "";
25             if (sender != null && sender != 0) {
26               appSource = sender.getHost().Source;
27             }
28             
29             var errorType = args.ErrorType;
30             var iErrorCode = args.ErrorCode;
32             if (errorType == "ImageError" || errorType == "MediaError") {
33               return;
34             }
36             var errMsg = "Unhandled Error in Silverlight Application " +  appSource + "\n" ;
38             errMsg += "Code: "+ iErrorCode + "    \n";
39             errMsg += "Category: " + errorType + "       \n";
40             errMsg += "Message: " + args.ErrorMessage + "     \n";
42             if (errorType == "ParserError") {
43                 errMsg += "File: " + args.xamlFile + "     \n";
44                 errMsg += "Line: " + args.lineNumber + "     \n";
45                 errMsg += "Position: " + args.charPosition + "     \n";
46             }
47             else if (errorType == "RuntimeError") {           
48                 if (args.lineNumber != 0) {
49                     errMsg += "Line: " + args.lineNumber + "     \n";
50                     errMsg += "Position: " +  args.charPosition + "     \n";
51                 }
52                 errMsg += "MethodName: " + args.methodName + "     \n";
53             }
55             throw new Error(errMsg);
56         }
57     </script>
58 </head>
59 <body>
60     <form id="form1" runat="server" style="height:100%">
61     <div id="silverlightControlHost">
62         <object data="data:application/x-silverlight-2," type="application/x-silverlight-2" width="100%" height="100%">
63                   <param name="source" value="ClientBin/VBSL3Navigation.xap"/>
64                   <param name="onError" value="onSilverlightError" />
65                   <param name="background" value="white" />
66                   <param name="minRuntimeVersion" value="3.0.40624.0" />
67                   <param name="autoUpgrade" value="true" />
68                   <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=3.0.40624.0" style="text-decoration:none">
69                           <img src="http://go.microsoft.com/fwlink/?LinkId=108181" alt="Get Microsoft Silverlight" style="border-style:none"/>
70                   </a>
71             </object><iframe id="_sl_historyFrame" style="visibility:hidden;height:0px;width:0px;border:0px"></iframe></div>
72     </form>
73 </body>
74 </html>